package com.example.demo.Service;

import com.example.demo.Dao.DeliveryDao;
import com.example.demo.Entity.Count;
import com.example.demo.Entity.Delivery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class DeliveryService {
    @Autowired
    private DeliveryDao deliveryDao;

    public List<Delivery> getDelivery() {
        return deliveryDao.getDelivery();
    }

    public List<Delivery> getDeliverymohuByname(String name) {
        return deliveryDao.getDeliverymohuByname(name);
    }

    public Delivery inputDelivery(Integer p_u_id, Integer p_id, String date, String p_rnumber, Integer p_state,String p_name) {
        return deliveryDao.inputDelivery(p_u_id, p_id, date, p_rnumber, p_state,p_name);
    }
    public List<Count> getCountDelivery(){
        return deliveryDao.getCountDelivery();
    }

    public List<Delivery> getDeliveryByname(String name){
        return deliveryDao.getDeliveryByname(name);
    }
}
